-
Notifications
You must be signed in to change notification settings - Fork 0
Update glibc from 2.36 to 2.43 #3354
Update glibc from 2.36 to 2.43 #3354
Conversation
|
Currently breaks PAM, and therefore SSH and sudo. I’ll fix dose in the next days. |
|
Maybe this is related to the removal/deprecation of libcrypt.so.1 in glibc 2.38 /1/ ? /1/ https://sourceware.org/glibc/wiki/Release/2.38#Building_libcrypt_is_disabled_by_default |
|
Thomas Kreitler (@thomas), thank you for the tip. That was indeed it. After
|
|
Tested on maleficent. |
|
tested on theinternet |
|
|
|
Can we get C.UTF8 locale? |
Are there cookies included ? Ice ? Go for it. |
glibc 2.43 already contains the three fixes below, so drop the patches:
glibc-linux-Fix-sys-mount.h-usage-with-kernel-headers.patch
glibc-2.36-0004-tunables-Terminate-if-end-of-input-is-reached-CVE-2023-4911.patch
glibc-2.36-Makerules-fix-MAKEFLAGS-assignment-for-upcoming-make.patch
The two ldconfig patches are MarIuX specific and have to stay.
Update to the latest stable Linux release, so glibc is built against up to date kernel headers.
Building glibc 2.43 against the Linux 7.0 headers fails, because
glibc's <sys/mount.h> and the kernel's <linux/mount.h> both define
OPEN_TREE_CLONE, and the two definitions differ:
In file included from ../sysdeps/unix/sysv/linux/include/sys/mount.h:22,
from ../sysdeps/unix/sysv/linux/umount.c:18:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/sys/mount.h:32:
/usr/include/linux/mount.h:64: note: this is the location of the previous definition
64 | #define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/include/sys/mount.h:22,
from ../sysdeps/unix/sysv/linux/umount2.c:19:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/sys/mount.h:32:
/usr/include/linux/mount.h:64: note: this is the location of the previous definition
64 | #define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
|
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:263: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:263: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount2.os] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:247: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount.o] Error 1
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:247: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount2.o] Error 1
make[2]: Leaving directory '/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/source/misc'
make[1]: *** [Makefile:484: misc/subdir_lib] Error 2
make[1]: Leaving directory '/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/source'
make: *** [Makefile:20: all] Error 2
So go back to the 6.18 series, whose headers glibc 2.43 builds against.
Building glibc 2.43 against the Linux 7.0 headers fails, because
glibc's <sys/mount.h> redefines OPEN_TREE_CLONE, which the kernel's
<linux/mount.h> already defines:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
So backport the two upstream commits fixing bug 33921 [1]:
Commit 419245719ccb ("include: isolate __O_CLOEXEC flag for
sys/mount.h and fcntl.h", 2026-01-26) stops <sys/mount.h> from
pulling in <fcntl.h>, and commit d12b017cddfe ("Linux: Only define
OPEN_TREE_* macros in <sys/mount.h> if undefined (bug 33921)",
2026-03-04) only defines the OPEN_TREE_* macros if the kernel
headers did not already define them.
[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=33921
`--enable-kernel` tells glibc the oldest Linux version it has to support at runtime. The higher the version, the more compatibility code glibc can drop, but the resulting binaries refuse to start on older kernels. Raise it from 5.15.77 to the current Linux release 7.0.3.
glibc 2.38 stopped building libcrypt by default [1]:
* libcrypt is no longer built by default; one may use the
"--enable-crypt" option to build libcrypt. libcrypt is likely to
be removed from the GNU C Library in a future release; we
recommend that distributions and applications port away from it
to an alternative such as libxcrypt.
As `glibc.be0` does not pass `--enable-crypt`, updating glibc to 2.43
leaves MarIuX without `libcrypt.so.1` and `<crypt.h>`. So add
libxcrypt, the replacement recommended above, which by default
(`--enable-obsolete-api=yes`) ships a `libcrypt.so.1` compatible with
the one from glibc.
[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;hb=refs/tags/glibc-2.38
libxcrypt requires Perl 5.14 or later — `configure.ac` calls `zw_PROG_PERL([5.14.0])` and uses Perl to generate the hash tables and the symbol version floor — but MarIuX' system Perl is 5.12.1, so `configure` aborts with *Perl version 5.14.0 or later is required*. So source the profile of the packaged Perl 5.34.0.
Requiring Linux 7.0.3 makes the glibc binaries refuse to start on every
kernel MarIuX currently ships, the oldest being 5.15.77:
$ fakeroot bee list linux | grep ^linux
linux-5.15.77-440.x86_64
linux-5.15.86-443.x86_64
linux-5.15.94-447.x86_64
linux-5.15.112-449.x86_64
linux-5.15.131-457.x86_64
linux-5.15.160-476.x86_64
linux-6.1.53-458.x86_64
linux-6.6.12-461.x86_64
linux-6.6.35-477.x86_64
linux-6.12.11-479.x86_64
linux-6.12.29-483.x86_64
linux-6.12.40-484.x86_64
linux-6.12.49-487.x86_64
linux-6.12.74-489.x86_64
linux-firmware-20230804_p7_g789aa815-2.x86_64
linux-headers-6.15.3-0.x86_64
So lower `--enable-kernel` to 5.15 again.
`mee_install_post()` only generates the locales listed there, and C.UTF-8 is not among them. It is the locale independent UTF-8 locale more and more programs expect, and without it `LC_ALL=C.UTF-8` fails and programs fall back to the ASCII only C locale. So generate it, too.
761da85 to
63302e1
Compare
|
When we update we need to make sure, that fixes for these are included: |
|
The patches are not in 2.43 and they don't apply naively to 2.43. They are complex, adding new modules. 2.45 is not yet released, last tag in git://sourceware.org/git/glibc.git is glibc-2.44. 2.45 is development branch, expected February 2027. I think we shouldn't risk to update to master. So the patches will not be included this time. Paul Menzel (@pmenzel): Can I merge and distribute this as is now before the power shutdown tomorrow? |
|
Yes, go ahead. I wanted to clean up the commit history a little, but it’s good enough. |
Looks like this was resolved and closed, no idea, why github still shows it.
|
Oh dear |
|
Forgot the libxcrypt :-) |
|
Hmm. Removal of |
|
static. static. static. |
Update with
sudo mxgrub --rebootalso worked.